package model

import "time"

// 积分订单模型（包含JSON序列化）
type IntegralOrder struct {
    OrderID   string      `gorm:"primaryKey;size:32" json:"order_id"`
    UserID    uint        `gorm:"index;not null" json:"user_id"`
    Amount    float64     `gorm:"type:decimal(10,2);not null" json:"amount"`
    Integral  int         `gorm:"not null" json:"integral"`
    Status    string      `gorm:"type:ENUM('pending','success','failed');default:'pending'" json:"status"`
    CreatedAt time.Time   `gorm:"autoCreateTime" json:"created_at"`
    PaidAt    *time.Time  `gorm:"index" json:"paid_at,omitempty"`
}